package marketplace.jpa.interfaces;

import java.util.List;

import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;

import marketplace.jpa.datas.DataAdministrador;
import marketplace.jpa.datas.DataCliente;
import marketplace.jpa.datas.DataContenidoDigital;
import marketplace.jpa.datas.DataProveedor;
import marketplace.jpa.entities.Usuario;

public interface IUsuarioDAO {

	
	///////////////////////////// ADMINISTRADOR /////////////////////////////
	
	@TransactionAttribute(TransactionAttributeType.REQUIRED)
	public abstract boolean guardarAdministrador(DataAdministrador dataAdministrador) throws Exception;

	public abstract void modificarAdministrador(DataAdministrador da);

	public abstract void eliminarAdministrador(String mail);

	@TransactionAttribute(TransactionAttributeType.REQUIRED)
	public abstract boolean existeAdministrador(String mail) throws Exception;

	@TransactionAttribute(TransactionAttributeType.REQUIRED)
	public abstract DataAdministrador obtenerAdministrador(String mail) throws Exception;

	public abstract List<DataAdministrador> getAdministradores();

	
	
	/////////////////////////// PROVEEDOR /////////////////////////////
	
	@TransactionAttribute(TransactionAttributeType.REQUIRED)
	public abstract boolean guardarProveedor(DataProveedor dataProveedor) throws Exception;

	public abstract void modificarProveedor(DataProveedor da);

	public abstract void eliminarProveedor(String mail);

	@TransactionAttribute(TransactionAttributeType.REQUIRED)
	public abstract boolean existeProveedor(String mail) throws Exception;

	@TransactionAttribute(TransactionAttributeType.REQUIRED)
	public abstract DataProveedor obtenerProveedor(String mail) throws Exception;

	public abstract List<DataProveedor> getProveedores();

	
	
	/////////////////////////// CLIENTE /////////////////////////////
	
	@TransactionAttribute(TransactionAttributeType.REQUIRED)
	public abstract boolean guardarCliente(DataCliente cli) throws Exception;

	@TransactionAttribute(TransactionAttributeType.REQUIRED)
	public abstract void eliminarCliente(String mail) throws Exception;

	@TransactionAttribute(TransactionAttributeType.REQUIRED)
	public abstract void modificarCliente(DataCliente nuevosDatos) throws Exception;

	@TransactionAttribute(TransactionAttributeType.REQUIRED)
	public abstract List<DataCliente> getListaClientes() throws Exception;

	@TransactionAttribute(TransactionAttributeType.REQUIRED)
	public abstract DataCliente buscarCliente(String mail) throws Exception;

	public abstract boolean existeCliente(String mail) throws Exception;

	public abstract boolean validarLogin(String mail, String pass) throws Exception;

	@TransactionAttribute(TransactionAttributeType.REQUIRED)
	public abstract boolean RegistroClienteACanal(String mail, String idRegistroGCM) throws Exception;

	@TransactionAttribute(TransactionAttributeType.REQUIRED)
	public abstract String getCodigoClienteAndroid(String mail) throws Exception;

	@TransactionAttribute(TransactionAttributeType.REQUIRED)
	public abstract void agregarContenidoDigitalWishlist(String mail, int idContenido) throws Exception;

	@TransactionAttribute(TransactionAttributeType.REQUIRED)
	public abstract List<DataContenidoDigital> obtenerWishlist(String mail) throws Exception;

	@TransactionAttribute(TransactionAttributeType.REQUIRED)
	public abstract boolean existeContenidoDigitalWishlist(String mail, int idContenido) throws Exception;


}